<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:c="http://java.sun.com/jsp/jstl/core">
	<f:metadata>
		<f:viewParam name="deal" value="#{dealList.singularDealId}" />
	</f:metadata>
	<head><title>IGNORED</title></head>
	<body>
		<ui:composition template="templates/layout.xhtml">
			<ui:define name="windowTitle">Daily Market | Deal | #{dealList.dealBean.shortDesc}</ui:define>
			<ui:define name="logoImage"><h:graphicImage library="images" name="logo_header.jpg" alt="logo" /></ui:define>
			<ui:define name="content">
				<div id="content" class="graphic_bg">
					<h:messages globalOnly="true" styleClass="form-messages" fatalClass="form-messages error" errorClass="form-messages error" warnClass="form-messages warn" infoClass="form-messages" />
					<h:panelGroup rendered="#{dealList.dealBean.ID gt 0}">
						<div class="deal-image">
							<img src="#{dealList.dealBean.findDefaultImageUrl(300)}" alt="#{dealList.dealBean.shortDesc}" id="deal_image" />
							<c:forEach items="#{dealList.dealBean.images}" var="image" begin="0" end="5">
								<a href="Javascript:;" onclick="set_deal_image('#{dealList.dealBean.findImageUrl(image, 300)}');" class="image-link"><img src="#{dealList.dealBean.findImageUrl(image, 50)}" alt="#{image}" title="Product Image" /></a>
							</c:forEach>
						</div>
						<div class="deal-vitals">
							<div class="deal-actionbox">
								<h:form>
									<h:commandLink styleClass="image-button" action="#{cartBean.doAddToCart(dealList.dealBean)}">
										<h:graphicImage library="images/icons/16" name="cart_put.png" alt="a" title="Add to Cart" />Add to Cart
									</h:commandLink>
								</h:form>
							</div>
							<h:outputText value="#{dealList.dealBean.shortDesc}" styleClass="deal-title detail" />
							<h:outputText value="#{dealList.dealBean.priceDisplay}" styleClass="deal-pricetag" />
							<h:outputText value="#{dealList.dealBean.timeLeftDisplay}" styleClass="deal-timer" style="#{dealList.dealBean.timeLeftStyle}" rendered="#{dealList.dealBean.timed}" />

						</div>
						<div class="deal-details">
							<h:outputText value="#{dealList.dealBean.companyDisplay}" styleClass="deal-company" />
							<h:outputText value="#{dealList.dealBean.longDesc}" />
						</div>
					</h:panelGroup>
					<h:outputText rendered="#{dealList.dealBean.ID lt 1}" styleClass="notification error" value="Invalid deal! This deal does not exist!" />
				</div>
			</ui:define>
		</ui:composition>
	</body>

</html>


